package com.daquexian.flexiblerichtextview.greendao.dao;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.daquexian.flexiblerichtextview.greendao.bean.FlexiImg;
import com.daquexian.flexiblerichtextview.greendao.bean.TestUser;

import com.daquexian.flexiblerichtextview.greendao.dao.FlexiImgDao;
import com.daquexian.flexiblerichtextview.greendao.dao.TestUserDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig flexiImgDaoConfig;
    private final DaoConfig testUserDaoConfig;

    private final FlexiImgDao flexiImgDao;
    private final TestUserDao testUserDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        flexiImgDaoConfig = daoConfigMap.get(FlexiImgDao.class).clone();
        flexiImgDaoConfig.initIdentityScope(type);

        testUserDaoConfig = daoConfigMap.get(TestUserDao.class).clone();
        testUserDaoConfig.initIdentityScope(type);

        flexiImgDao = new FlexiImgDao(flexiImgDaoConfig, this);
        testUserDao = new TestUserDao(testUserDaoConfig, this);

        registerDao(FlexiImg.class, flexiImgDao);
        registerDao(TestUser.class, testUserDao);
    }
    
    public void clear() {
        flexiImgDaoConfig.clearIdentityScope();
        testUserDaoConfig.clearIdentityScope();
    }

    public FlexiImgDao getFlexiImgDao() {
        return flexiImgDao;
    }

    public TestUserDao getTestUserDao() {
        return testUserDao;
    }

}
